<?php 
class bc_model extends CI_Model {
        function __construct()
        {
                parent::__construct();        
                $this->load->helper("local");
                $this->load->helper('date');
			    $this->load->database();
        } 
//START-----------------bc-------------------------//              
		function get_all_bc()
        {
			    $this->load->database();
                $query = $this->db->query("select * from bc_profile where profile_type='BC' order by bc_company_name ASC");
			return $query->result();
        }
		function getbcSearchBydv_company_name($comp_name)
       {       $query = $this->db->query ("select * from bc_profile where bc_company_name like '%$comp_name%' order by bc_company_name ASC Limit 10");
				return $query->result();
       }

	   function getbcSearchfromloadsbyCN()
       {       $query = $this->db->query ("select b.* from bc_profile b inner join loads d on b.bc_company_name = d.bc_company_name
										where pick_up_city like '%$pick_up_city%' and pick_up_state like '%$pick_up_state%'
										and drop_off_city like '%$drop_off_city%' and drop_off_state like '%$drop_off_state%'");
				return $query->result();
       }
	   function getbc_info($code)
        {        
                $query = $this->db->query("select *from bc_profile where broker_code='$code'");
                 //return $query->result();
				 return $query->row();
        }
//End-----------------bc -------------------------//              		

}
?>
